<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta http-equiv="Expires" content="0">
    <meta http-equiv="Pragma" content="no-cache">
    <meta http-equiv="Cache-control" content="no-cache">
    <meta http-equiv="Cache" content="no-cache">
    <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8,IE=EmulateIE9,IE=edge">
    <meta name="viewport" content="initial-scale=1.0, user-scalable=no, width=device-width">
    <style>
       .date-time {
        width:100px;
		color: #fff;
		font-size: 14px;
		line-height: 17px;
		margin-right: 10px;
		overflow: hidden;
	}
    </style>
</head>
<body>

        <div class="date-time" id="dateTime">
            <p class="time"></p>
            <p class="date"></p>
        </div>
        <script src="https://cdn.bootcss.com/jquery/3.3.1/jquery.min.js"></script>
<script type="text/javascript" th:src="@{/js/business/monitoringCentre/wind.js}"></script>
<script th:inline="javascript">
     var _tme = setInterval(function () {
        var _ret = wPlugin.returnDate(' : ', ' / ');
        $("#dateTime").html('<p class="time">' + _ret.time + '</p><p class="date">' + _ret.date + '</p>');
    }, 500); 
    //获得年月日      得到日期oTime
    function getFormatDate(str){
        var oDate = new Date(str),
            oYear = oDate.getFullYear(),
            oMonth = oDate.getMonth()+1,
            oDay = oDate.getDate(),
            oHour = oDate.getHours(),
            oMin = oDate.getMinutes(),
            oSen = oDate.getSeconds(),
            oTime = oYear +'-'+ getzf(oMonth) +'-'+ getzf(oDay) +' '+ getzf(oHour) +':'+ getzf(oMin) +':'+getzf(oSen);//最后拼接时间
        return oTime;
    };
    //补0操作
    function getzf(num){
        if(parseInt(num) < 10){
            num = '0'+num;
        }
        return num;
    }
</script>
</body>
</html>